var app = getApp();

Component({
    "options": {
        styleIsolation: "isolated"
    },
    properties: {
        width: {type: String, value: "50px"},
        height: {type: String, value: "50px"},
        mode: {type: String, value: "aspectFit"},
        src: {type: String, value: "/images/blank.png"}
    },
    data: {
        noerror: false
    },
    lifetimes: {
        ready: function () {
        }
    },
    observers: {
        src: function (src) {
            this.setData({
                noerror: true
            })
        }
    },
    methods: {
        onerror: function () {
            this.setData({
                noerror: false
            })
        }
    }
});